﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Equation.Enterprise.Framework.ApplicationServices;

namespace ENail.Domain.Core.Contract.Services
{
    public interface IRegistrationService : IApplicationService
    {
        /// <summary>
        /// Helps view all registrations on list view
        /// </summary>
        /// <returns>List of all registrations</returns>
        IList<Registration> GetAllRegistrations();

        /// <summary>
        /// Helps view registrations for search view
        /// </summary>
        /// <param name="where">Lambda condition to get registrations</param>
        /// <returns></returns>
        IList<Registration> GetRegistrations(Expression<Func<Registration, bool>> where);

        /// <summary>
        /// Helps view active registrations only
        /// </summary>
        /// <returns>All active registrations</returns>
        IList<Registration> GetAllActiveRegistrations();

        /// <summary>
        /// Helps view details of an registration
        /// </summary>
        /// <param name="id">Identity of registration</param>
        /// <returns>Registration with specified identity</returns>
        Registration GetRegistration(int id);

        /// <summary>
        /// Insert an registration from view
        /// </summary>
        /// <param name="registration">Registration to be inserted</param>
        /// <returns>Number of records affected</returns>
        int InsertRegistration(Registration registration);

        /// <summary>
        /// Update an registration from view
        /// </summary>
        /// <param name="registration">Registration to be updated</param>
        /// <returns>Number of records affected</returns>
        int UpdateRegistration(Registration registration);

        /// <summary>
        /// Helps to inactive an registration
        /// </summary>
        /// <param name="registration">Registration to be inactive</param>
        /// <returns>Number of records affected</returns>
        int DeActivateRegistration(Registration registration);
    }
}
